<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class Drive_Delete extends Page
{
       public $hiddenDrive = null;
       public $hiddenEmp = null;
       function Drive_DeleteCreate($sender, $params)
       {
       $emp = $_GET['emp'];
       $driving_history = $_GET['driving_history'];
       $this->hiddenEmp->setValue($emp);
       $this->hiddenDrive->setValue($driving_history);

       $result = mysql_query("delete from emp_drivinghistory_tbl where history_id='".$this->hiddenDrive->getValue()."'");

       redirect('personnel_driving_list.php?emp='.$this->hiddenEmp->getValue().'&driving_history='.$this->hiddenDrive->getValue());


       }

}

global $application;

global $Drive_Delete;

//Creates the form
$Drive_Delete=new Drive_Delete($application);

//Read from resource file
$Drive_Delete->loadResource(__FILE__);

//Shows the form
$Drive_Delete->show();

?>